import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        record: {},
        outOptions: [{
                value: "基本生活",
                label: "基本生活",
                children: [{
                        value: "餐饮饮食",
                        label: "餐饮饮食"
                    },
                    {
                        value: "水果零食",
                        label: "水果零食"
                    },
                    {
                        value: "日常用品",
                        label: "日常用品"
                    },
                    {
                        value: "柴米油盐",
                        label: "柴米油盐"
                    },
                    {
                        value: "物业水电",
                        label: "物业水电"
                    },
                    {
                        value: "医疗保健",
                        label: "医疗保健"
                    }
                ]
            },
            {
                value: "交通通讯",
                label: "交通通讯",
                children: [{
                        value: "交通费",
                        label: "交通费,"
                    },
                    {
                        value: "话费网费",
                        label: "话费网费"
                    },
                    {
                        value: "养车费",
                        label: "养车费"
                    }
                ]
            },
            {
                value: "文化娱乐",
                label: "文化娱乐",
                children: [{
                        value: "旅游娱乐",
                        label: "旅游娱乐,"
                    },
                    {
                        value: "博彩彩票",
                        label: "博彩彩票"
                    },
                    {
                        value: "书报音像",
                        label: "书报音像"
                    },
                    {
                        value: "数码产品",
                        label: "数码产品"
                    },
                    {
                        value: "教育培训",
                        label: "教育培训"
                    }
                ]
            },
            {
                value: "美容装扮",
                label: "美容装扮",
                children: [{
                        value: "服饰装扮",
                        label: "服饰装扮,"
                    },
                    {
                        value: "化妆品美容",
                        label: "化妆品美容"
                    }
                ]
            },
            {
                value: "人情往来",
                label: "人情往来",
                children: [{
                        value: "人际往来",
                        label: "人际往来,"
                    },
                    {
                        value: "礼品礼金",
                        label: "礼品礼金"
                    },
                    {
                        value: "孝敬长辈",
                        label: "孝敬长辈"
                    }
                ]
            },
            {
                value: "其他支出",
                label: "其他支出",
                children: [{
                        value: "房产车产",
                        label: "房产车产,"
                    },
                    {
                        value: "投资亏损",
                        label: "投资亏损"
                    },
                    {
                        value: "电器家居",
                        label: "电器家居"
                    },
                    {
                        value: "其他杂项",
                        label: "其他杂项"
                    }
                ]
            }
        ],
        inOptions: [{
                value: "工资",
                label: "工资"
            },
            {
                value: "奖金",
                label: "奖金"
            },
            {
                value: "补贴津贴",
                label: "补贴津贴"
            },
            {
                value: "公务报销",
                label: "公务报销"
            },
            {
                value: "投资收益",
                label: "投资收益"
            },
            {
                value: "其他收入",
                label: "其他收入"
            }
        ],
        flag: true
    },
    mutations: {
        setRecord(state, cord) {
            state.record = cord
        },
        getRecord(state) {
            return state.record
        },
        setFlag(state) {
            state.flag = false
        }
    },
    actions: {},
    modules: {}
})